var weather_type = [{
    "wid": "00",
    "weather": "晴"
  },
  {
    "wid": "01",
    "weather": "多云"
  },
  {
    "wid": "02",
    "weather": "阴"
  },
  {
    "wid": "03",
    "weather": "阵雨"
  },
  {
    "wid": "04",
    "weather": "雷阵雨"
  },
  {
    "wid": "05",
    "weather": "雷阵雨伴有冰雹"
  },
  {
    "wid": "06",
    "weather": "雨夹雪"
  },
  {
    "wid": "07",
    "weather": "小雨"
  },
  {
    "wid": "08",
    "weather": "中雨"
  },
  {
    "wid": "09",
    "weather": "大雨"
  },
  {
    "wid": "10",
    "weather": "暴雨"
  },
  {
    "wid": "11",
    "weather": "大暴雨"
  },
  {
    "wid": "12",
    "weather": "特大暴雨"
  },
  {
    "wid": "13",
    "weather": "阵雪"
  },
  {
    "wid": "14",
    "weather": "小雪"
  },
  {
    "wid": "15",
    "weather": "中雪"
  },
  {
    "wid": "16",
    "weather": "大雪"
  },
  {
    "wid": "17",
    "weather": "暴雪"
  },
  {
    "wid": "18",
    "weather": "雾"
  },
  {
    "wid": "19",
    "weather": "冻雨"
  },
  {
    "wid": "20",
    "weather": "沙尘暴"
  },
  {
    "wid": "21",
    "weather": "小雨-中雨"
  },
  {
    "wid": "22",
    "weather": "中雨-大雨"
  },
  {
    "wid": "23",
    "weather": "大雨-暴雨"
  },
  {
    "wid": "24",
    "weather": "暴雨-大暴雨"
  },
  {
    "wid": "25",
    "weather": "大暴雨-特大暴雨"
  },
  {
    "wid": "26",
    "weather": "小雪-中雪"
  },
  {
    "wid": "27",
    "weather": "中雪-大雪"
  },
  {
    "wid": "28",
    "weather": "大雪-暴雪"
  },
  {
    "wid": "29",
    "weather": "浮尘"
  },
  {
    "wid": "30",
    "weather": "扬沙"
  },
  {
    "wid": "31",
    "weather": "强沙尘暴"
  },
  {
    "wid": "53",
    "weather": "霾"
  }
]

function getWeatherColor(wid) {
  var color = {
    from_color: '',
    to_color: ''
  }
  switch (wid) {
    case "00": // 晴
      color.from_color = '#1596EA'
      color.to_color = '#5ABEF9'
      break
    case "01": // 多云
    case "02": // 阴
      color.from_color = '#808080'
      color.to_color = '#C0C0C0'
      break
    case "03": //阵雨
    case "04": //雷阵雨
    case "05":
    case "06":
    case "07":
    case "08":
    case "09":
    case "10":
    case "11":
    case "12":
    case "21":
    case "22":
    case "23":
    case "24":
    case "25":
      color.from_color = '#8FAFCE'
      color.to_color = '#B9D1E2'
      break
    case "13": //阵雪
    case "14":
    case "15":
    case "16":
    case "17":
    case "19": //冻雨
    case "26":
    case "27":
    case "28":
      color.from_color = '#e0f0e9'
      color.to_color = '#e3f9fd'
      color.color = 'black'
      break
    case "18": //雾
    case "29":
    case "30":
    case "31":
    case "53": //霾
      color.from_color = '#c89b40'
      color.to_color = '#D2B48C'
      color.color = 'black'
      break
  }
  return color;
}

module.exports = {
  getWeatherColor
}